package ecmnext.net;

/***************************************************************/
/*                     SOFTWARE SECTION                        */
/***************************************************************/
/*
 * <p>Name: ECMNext</p>
 * <p>Description: Simulation of the platform of trading Software</p>
 * <p>Licence: General Public License</p>
 * <p>Organisation: EC Marseille</p>
 * <p>Persons involved in the project : groupe Plateforme de Trading</p>
 * <p>Current version: 1.0</p>
 */

/***************************************************************/
/*                       IMPORT SECTION                        */
/***************************************************************/

import org.jdom.*;


/***************************************************************/
/*               NetworkReadable INTERFACE SECTION             */
/***************************************************************/

/**
 * <p>Title : NetworkReadable</p>
 * <p>Description : this interface ensure that class implementing it will be
 * able to init themselves from an xml parsed String (already parsed, so that
 * all mal-formed String have already been eliminated).</p>
 * @author Xuewen YANG ET Antoine COUDERC
 * @version 1.0
 * @see jessx.net.NetworkWritable
 */
public interface NetworkReadable {

  /**
   * This method should init the object using the xml node given.
   * If the object could not be initialized (because <code>rootNode</code> has
   * not a valid structure for this class for example), the method should return
   * <code>false</code>, and <code>true</code> only if the object has
   * successfully been initialized.
   * @param rootNode Element an xml node representing the object.
   * @return boolean whether the operation was successful or not.
   */
  public boolean initFromNetworkInput(Element rootNode);
}
